package org.swxjava;

import java.lang.reflect.Method;

public class Call {
	
    private String callId = null;

    private String serviceClass = null;

    private Object serviceInstance = null;
    
    private String args = null;
    
    private String methodName = null;

    private Method method = null;
    
    private String url = null;
    
    private boolean debug = false;

    private Object[] parameters = null;

    private Throwable exception = null;

    /**
     * @return the exception
     */
    public Throwable getException()
    {
        return exception;
    }

    /**
     * @param exception the exception to set
     */
    public void setException(Throwable exception)
    {
        this.exception = exception;
    }

    /**
     * @return the method
     */
    public Method getMethod()
    {
        return method;
    }

    /**
     * @param method the method to set
     */
    public void setMethod(Method method)
    {
        this.method = method;
    }

    /**
     * @return the parameters
     */
    public Object[] getParameters()
    {
        return parameters;
    }

    /**
     * @param parameters the parameters to set
     */
    public void setParameters(Object[] parameters)
    {
        this.parameters = parameters;
    }

    /**
     * @param callId The callId to set.
     */
    public void setCallId(String callId)
    {
        this.callId = callId;
    }

    /**
     * @return Returns the callId.
     */
    public String getCallId()
    {
        return callId;
    }

    /**
     * @param serviceClass The serviceClass to set.
     */
    public void setServiceClass(String serviceClass)
    {
        this.serviceClass = serviceClass;
    }

    /**
     * @return Returns the scriptName.
     */
    public String getServiceClass()
    {
        return serviceClass;
    }
	
    /**
     * @param methodName The methodName to set.
     */
    public void setMethodName(String methodName)
    {
        this.methodName = methodName;
    }

    /**
     * @return Returns the methodName.
     */
    public String getMethodName()
    {
        return methodName;
    }

	public String getArgs() {
		return args;
	}

	public void setArgs(String args) {
		this.args = args;
	}

	public boolean isDebug() {
		return debug;
	}

	public void setDebug(boolean debug) {
		this.debug = debug;
	}
	
	public void setDebug(String debug) {
		if(debug == null) {
			// nothing to change
			return;
		} else {
			this.debug = Boolean.parseBoolean(debug);
		}
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Object getServiceInstance() {
		return serviceInstance;
	}

	public void setServiceInstance(Object serviceInstance) {
		this.serviceInstance = serviceInstance;
	}
	
}
